
<%@ page import="br.academia.Funcionario"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName" value="${message(code: 'funcionario.label', default: 'Funcionario')}" />
<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
	<div class="nav">
		<g:link class="create" action="create">Novo(a) Funcionario
		</g:link>
	</div>
	<h1 id="pageName">Lista de Funcionario</h1>
	<table class="IadTableList">
		<thead>
			<tr>

				<g:sortableColumn property="id" title="${message(code: 'funcionario.id.label', default: 'Id')}" />

				<g:sortableColumn property="username" title="${message(code: 'funcionario.username.label', default: 'Username')}" />

				<g:sortableColumn property="nome" title="${message(code: 'funcionario.nome.label', default: 'Nome')}" />

				<g:sortableColumn property="telefone" title="${message(code: 'funcionario.telefone.label', default: 'Telefone')}" />

				<g:sortableColumn property="matricula" title="${message(code: 'funcionario.matricula.label', default: 'Matricula')}" />

				<g:sortableColumn property="CPF" title="${message(code: 'funcionario.CPF.label', default: 'CPF')}" />
				
				<g:sortableColumn property="CPF" title="${message(code: 'funcionario.roles.label', default: 'Roles')}" />

			</tr>
		</thead>
		<tbody>
			<g:each in="${funcionarioInstanceList}" status="i" var="funcionarioInstance">
				<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

					<td><g:link action="show" id="${funcionarioInstance.id}">
							${fieldValue(bean: funcionarioInstance, field: "id")}
						</g:link></td>

					<td>
						${fieldValue(bean: funcionarioInstance, field: "username")}
					</td>

					<td>
						${fieldValue(bean: funcionarioInstance, field: "nome")}
					</td>

					<td>
						${fieldValue(bean: funcionarioInstance, field: "telefone")}
					</td>

					<td>
						${fieldValue(bean: funcionarioInstance, field: "matricula")}
					</td>

					<td>
						${fieldValue(bean: funcionarioInstance, field: "CPF")}
					</td>
					
					<td>
						${fieldValue(bean: funcionarioInstance, field: "roles")}
					</td>

				</tr>
			</g:each>
		</tbody>
	</table>
	<div class="paginateButtons">
		<g:paginate total="${funcionarioInstanceTotal}" />
	</div>
</body>
</html>
